<template>
    <van-notify v-model:show="show" :type="typeNotify">
        <van-icon name="bell" style="margin-right: 4px;" />
        <span>{{ curMsg }}</span>
    </van-notify>
</template>

<script setup>
const show = ref(false);
const curMsg = ref('');
const typeNotify = ref('success');

const showNotify = (message, type = 'success') => {
    curMsg.value = message
    typeNotify.value = type
    show.value = true;
    setTimeout(() => {
        show.value = false;
    }, 2000);
};
</script>

<style lang="less" scoped></style>